<#-- 
	rows
 -->
<#macro rows labels id=false class="" name=false select=false disabled=true onselect="">
    <#assign _ROWS_CHX_=name/>
    <#if name>
        <#assign _ROWS_VAL_=param_values(name)/>
    </#if>
     <div class="rows ${class}">
        <table <#if id>id="${id}"</#if> >
		    <thead><tr>
	            <#if _ROWS_CHX_>
	                <th width="1px">
	                    <input type="checkbox" 
	                    <#if select> checked </#if>
	                    <#if disabled> disabled </#if>
	                    onclick="if(!$rows.checkHasSelectedBoxes(this,'${name}'))return false;
	                    	$rows.selectCheckboxAll(this,'${name}');${onSelect}" >
	                </th>
	            </#if>
	            <#list labels as la>
	                <th><nobr>&nbsp;${la}&nbsp;</nobr></th>
	            </#list>
		    </tr></thead>
            <#nested>
        </table>
    </div>
    <#assign _ROWS_CHX_=false>
</#macro>


<#-- row -->
<#macro row id=false idx=-1 class="" value="" 
	select="default" disabled=false onclick=false onselect=false>
    <tr <#if id>id="${id}"</#if>
    <#if _CHX_>
    	class="row2"
    <#else>
    	class="row${idx%2}"
    </#if>
    <#if onselect> onclick="${onclick}" </#if>
    onmouseover="$rows.overRow(this)" onmouseout="$rows.outRow(this)" >
        <#if select!="none" && _ROWS_CHX_>
	        <#if select?is_boolean>
		        <#assign b=select/>
		    <#elseif select=="true">
		    	<#assign b=true/>
		    <#elseif select=="default" && _ROWS_VAL_?? >
		        <#assign b=_ROWS_VAL_?seq_contains(value)/>
		    <#else>
		        <#assign b=false/>
		    </#if>
		    <td width="1px">
                <input type="checkbox" <#if b> checked </#if>
                <#if disabled>
                    disabled <#if b> ><input type="hidden"</#if>
                <#else>
                    onclick="var status=$rows.onSelectCheckbox(this);${onselect};"
                </#if>
                name="${_ROWS_CHX_}" value="${value?html!''}">
            </td>
        </#if>
        <#nested>
    </tr>
</#macro>
